#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n,c,minn,t=0;
    cin>>n;
    int a[n];
    for(int i=0;i<=n-1;i++)
    {
        cin>>a[i];
    }
    sort(a,a+n);
    for(int i=0;i<=n-1;i++)
    {
        if(a[i]!=a[0]){
            if(a[i]>a[t])
            {
                t++;
            }
        }
    }
    cout<<n-t;
    fclose(stdin);
    fclose(stdout);
    return 0;
}
